package bishi.saijing;

import java.util.Scanner;

/**
 * @author: Tangxz
 * @email: 1171702529@qq.com
 * @cate: 2022/03/27 09:57
 */
public class _K {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int max = 0;
        while (n>0){
            n--;
            max = Math.max(max,sc.nextInt());
        }
        System.out.println(max);
    }
}
